package cate.common.table.activity.moonfight.sheet;

import cate.common.table.ESheet;
import cate.common.table.activity.moonfight.row.MoonHardLevelRow;

public class MoonHardLevelSheet extends ESheet<MoonHardLevelRow> {
    @Override
    public String getSheetName() {
        return "月下比武难度";
    }

    public MoonHardLevelRow getRowByRoundAndHard(int round, int level) {
        for (MoonHardLevelRow r :
        getList()) {
            if (r.level == round && r.hardLevel == level) {
                return r;
            }
        }
        return null;
    }

    public int getHardest(int round) {
        return getList().stream().mapToInt(row -> row.hardLevel).max().orElse(0);
    }
}
